package zut.cs.liziflower.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import zut.cs.liziflower.entity.Consumer;

import java.math.BigDecimal;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author xuwenke
 * @since 2022-05-17
 */
public interface ConsumerMapper extends BaseMapper<Consumer> {
    //根据姓名获取用户
    Consumer getByNameAndPassword(String name, String password);

    int updateInfo(@Param("userid") Integer userid, @Param("age") Integer age, @Param("sex") String sex, @Param("phone") String phone,@Param("password") String password);

    int updateMoneyAndScore(@Param("userid") Integer userid, @Param("money") BigDecimal money, @Param("score") Integer score);

    int updateAvator(@Param("userid") Integer userid, @Param("url") String url);
}
